import * as THREE from 'three';
// import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'
const model = new THREE.Group();
const geometry = new THREE.SphereGeometry( 4, 40, 40 );
const material = new THREE.MeshBasicMaterial( { color:0x00ffff} );
const sphere1 = new THREE.Mesh( geometry, material );
const sphere2 = new THREE.Mesh( geometry, material );
model.add( sphere1,sphere2 );

const A = new THREE.Vector3(10,10,0)//起点
// walk表示位移量
const walk = new THREE.Vector3(100,50,0)
let B = new THREE.Vector3()//表示运动的结束点
// B.addVectors(A,walk)
B = A.clone().add(walk)
console.log(B);
// sphere1.position.copy(A)
// sphere2.position.copy(B)


// 表示速度
const v = new THREE.Vector3(1,1,0)
// const walk2 = new THREE.Vector3(v.x*50,v.y*50,v.z*50)
const walk2 = v.clone().multiplyScalar(50)
B.addVectors(A, walk2)
sphere1.position.copy(A)
sphere2.position.copy(B)
export default {model};